(function(doc, win) {
	var element = doc.documentElement,
		resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
		designWidth = 1920,
		calc = function() {
			var clientWidth = element.clientWidth;
			if (clientWidth > 677) {
				clientWidth = 677
			};
			if (!clientWidth) return;
			element.style.fontSize = 40 * (clientWidth / designWidth) + 'px';
		};
	if (!doc.addEventListener) return;
	win.addEventListener(resizeEvt, calc, false);
	doc.addEventListener('DOMContentLoaded', calc, false);
})(document, window);
